Question L3-C1

The question is about defining the architecture of a simple neural network that is sufficient to implement a task of line following. On the right are illustrated four architectures: A a simple neuron with two inputs - B. A simple neuron with two inputs and an offset - C. A simple neuron with two inputs, an offset and a recurrent connection implementing memory - D. A two layers neural network with two neurons in the first layer and one neuron in the second one. The question is: "You are asked to design a neural network that is able to detect when one of the two ground sensors of the Thymio robot detects a black line on a white background. In short, when one of the two sensors detect black, the output of the network should be “1”, otherwise be “0”. This implies a binary output function on the output layer and a linear output function in the hidden layers. Which of the following neural network architecture is the minimal one to achieve this task?"

Answer A - a simple neuron with two inputs - is wrong: a single layer perceptron is not sufficient since it can only classify linearly separable patterns, which is not the case here. 
In the explanation of the student we would like to see that they understand that this solution can only classify linearly separable patterns and that the pattern here is a XOR (00>0, 01>1, 10>1, 11>0) which can not be separated linearly.

Answer B - A simple neuron with two inputs and an offset - is wrong: a single layer perceptron, even with an offset, is not sufficient since it can only classify linearly separable patterns, which is not the case here. 
In the explanation of the student we would like to see that they understand that this solution can only classify linearly separable patterns and that the pattern here is a XOR (00>0, 01>1, 10>1, 11>0) which can not be separated linearly.

Answer C - A simple neuron with two inputs, an offset and a recurrent connection implementing memory - is wrong: a single layer perceptron, even with an offset and memory, is not sufficient since it can only classify linearly separable patterns, which is not the case here. 
In the explanation of the student we would like to see that they understand that this solution can only classify linearly separable patterns and that the pattern here is a XOR (00>0, 01>1, 10>1, 11>0) which can not be separated linearly.

Answer D - A two layers neural network with two neurons in the first layer and one neuron in the second one - is correct. For this type of problem (a XOR) one needs two layers, as a single layer perceptron, even with memory, is not sufficient since it can only classify linearly separable patterns, which is not the case here. 
In the explanation of the student we would like to see that they understand that can generate non-linear separations and can handle the XOR pattern (00>0, 01>1, 10>1, 11>0) which can not be separated linearly.